-- GENERATED SPELL FOR [Dragonflayer Heartsplitter] --


function spell0_24071(pUnit, Event) --@Piercing Jab,n/a--
pUnit:FullCastSpellOnTarget(31551,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 20000, 1)
end

function spell1_24071(pUnit, Event) --@Piercing Jab,n/a--
pUnit:FullCastSpellOnTarget(59605,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 20000, 1)
end

function spell2_24071(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(43665,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 1500, 1)
end

function spell3_24071(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(59603,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 1500, 1)
end

function spell4_24071(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(32908,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 10331, 1)
end

function spell5_24071(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(59604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24071', 10296, 1)
end

function Sorts_24071(pUnit, Event)
local choix_sorts_24071 = math.random(0, 5)
if choix_sorts_24071 == 0 then
pUnit:RegisterEvent('spell0_24071', 1, 1)
end
if choix_sorts_24071 == 1 then
pUnit:RegisterEvent('spell1_24071', 1, 1)
end
if choix_sorts_24071 == 2 then
pUnit:RegisterEvent('spell2_24071', 1, 1)
end
if choix_sorts_24071 == 3 then
pUnit:RegisterEvent('spell3_24071', 1, 1)
end
if choix_sorts_24071 == 4 then
pUnit:RegisterEvent('spell4_24071', 1, 1)
end
if choix_sorts_24071 == 5 then
pUnit:RegisterEvent('spell5_24071', 1, 1)
end
end

function mob24071_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24071', math.random(1500, 3000), 1)
end

function mob24071_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24071_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24071_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24071, 1, 'mob24071_Action')
RegisterUnitEvent(24071, 2, 'mob24071_Leave')
RegisterUnitEvent(24071, 3, 'mob24071_Kill')
RegisterUnitEvent(24071, 4, 'mob24071_Die')
